# Creating a new Daily Scheduled Hours (Story Allocation Day)

This endpoint returns structured Daily Scheduled Hours (Story Allocation Day) objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `story_allocation_days` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: POST /story_allocation_days
Version: 1.0.0

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `assignment` (Assignment) - Reference the Assignment of the Story Allocation Day.
- `external_references` (ExternalReference) - Includes references to external integrations for this object.
- `story` (Story) - Reference the Story of the Story Allocation Day.
- `workspace` (Workspace) - Reference the Workspace of the Story Allocation Day.

## Request fields (application/json):

  - `story_allocation_day` (object)

  - `story_allocation_day.assignment_id` (integer, required)
    The ID of the Assignment the Daily Scheduled Hours are part of.

  - `story_allocation_day.date` (string, required)
    The date of the scheduled hours (e.g. 2014-12-31). The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `story_allocation_day.minutes` (integer, required)
    The amount of time scheduled for the day, in minutes
(e.g. `120` for 120 minutes, which is 2 hours).

  - `story_allocation_day.external_reference` (object)
    Typically populated programmatically by a third party system via an integration, this is an optional
object that holds data from an external system. It connects objects in an external system with objects in
Kantata OX (for example, to connect a Jira issue to a Kantata OX Project).

  - `story_allocation_day.external_reference.service_name` (string, required)
    The provider name of the integration. If you are adding multiple external references to the same object, the `service_name` must be unique.

  - `story_allocation_day.external_reference.service_model` (string, required)
    The object type of the external object this external reference belongs to.

  - `story_allocation_day.external_reference.service_model_ref` (string, required)
    The object ID of the external object this external reference belongs to.

  - `story_allocation_day.external_reference.status` (string)
    The status of the integration. Options are `successful`, `pending`,  or `failed`.

  - `story_allocation_day.external_reference.external_message` (string)
    The message on the external object.

  - `story_allocation_day.external_reference.external_link` (string)
    The link to the external object.

  - `story_allocation_day.external_reference.external_status` (string)
    The status of the external object in the external system.

  - `story_allocation_day.external_reference.locked` (boolean)
    Whether the subject is locked.

## Response 200:

  - `200` (unknown)
    Daily Scheduled Hours (Story Allocation Day) has been created.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `story_allocation_days` (object)

  - `external_references` (object)

  - `assignments` (object)

  - `stories` (object)

  - `workspaces` (object)

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized request

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403:

  - `403` (unknown)
    Forbidden request

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404:

  - `404` (unknown)
    Page Not Found

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422:

  - `422` (unknown)
    Unprocessable Entity

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503:

  - `503` (unknown)
    Service is unavailable

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

